﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using MyCalendar.Utils;

namespace MyCalendar.UIcomponent
{
    public partial class MyDay : UserControl 
    {

        ColorHelper mColorHelper = new ColorHelper ();

        public MyDay ()
        {
            InitializeComponent ();
            cBorder.DataContext = mColorHelper;
            myDateText.DataContext = mColorHelper;
        }

        public MyDay (Brush pBackgroundColor, Brush pTextColor)
        {

            InitializeComponent ();
            cBorder.DataContext = mColorHelper;

            mColorHelper.BackgroundColor = pBackgroundColor;
            mColorHelper.TextColor = pTextColor;
        }

        private void UserControl_MouseEnter (object sender, MouseEventArgs e)
        {

        }

        private void UserControl_MouseLeave (object sender, MouseEventArgs e)
        {
            cBorder.Background = mColorHelper.BackgroundColor;
        }

        private void UserControl_MouseLeftButtonDown (object sender, MouseButtonEventArgs e)
        {
            cBorder.Background = new SolidColorBrush (Colors.Red);
        }
    }
}
